
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>2.1 使用 Minikube 部署 · Kubernetes - 痴者工良</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="痴者工良">
        
        
    
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-insert-logo/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-advanced-emoji/emoji-website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-alerts/style.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    


    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="2.kubeadm.html" />
    
    
    <link rel="prev" href="2.deploy.md" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="https://www.whuanle.cn" target="_blank" class="custom-link">痴者工良的博客</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    文档说明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../1.basic/">
            
                <a href="../1.basic/">
            
                    
                    1.基础知识
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../1.basic/">
            
                <a href="../1.basic/">
            
                    
                    导读
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../1.basic/1.docker.html">
            
                <a href="../1.basic/1.docker.html">
            
                    
                    1.1 说透 Docker：基础
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../1.basic/2.virtual.html">
            
                <a href="../1.basic/2.virtual.html">
            
                    
                    1.2 说透 Docker： 虚拟化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../1.basic/3.docker_network.html">
            
                <a href="../1.basic/3.docker_network.html">
            
                    
                    1.3 了解 Docker 网络
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../1.basic/4.pod_docker.html">
            
                <a href="../1.basic/4.pod_docker.html">
            
                    
                    1.4 Docker 和 Pod
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="../1.basic/5.k8s.html">
            
                <a href="../1.basic/5.k8s.html">
            
                    
                    1.5 K8S入门基础
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="./">
            
                <a href="./">
            
                    
                    2.部署和配置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="2.deploy.md">
            
                <span>
            
                    
                    导读
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.3.2" data-path="1.minikube.html">
            
                <a href="1.minikube.html">
            
                    
                    2.1 使用 Minikube 部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="2.kubeadm.html">
            
                <a href="2.kubeadm.html">
            
                    
                    2.2 使用 kubeadm 部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="3.kubeadm_ckad.html">
            
                <a href="3.kubeadm_ckad.html">
            
                    
                    2.3 CKAD认证中的部署教程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="4.kubeadm_proxy.html">
            
                <a href="4.kubeadm_proxy.html">
            
                    
                    2.4 国内代理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="5.dashboard.html">
            
                <a href="5.dashboard.html">
            
                    
                    2.5 Dashboard
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../3.pod/">
            
                <a href="../3.pod/">
            
                    
                    3.Pod部署和调度
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../3.pod/">
            
                <a href="../3.pod/">
            
                    
                    导读
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../3.pod/1.pod.html">
            
                <a href="../3.pod/1.pod.html">
            
                    
                    3.1 Pod
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../3.pod/2.deployment.html">
            
                <a href="../3.pod/2.deployment.html">
            
                    
                    3.2 Deployment部署
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../3.pod/3.replica.html">
            
                <a href="../3.pod/3.replica.html">
            
                    
                    3.3 副本集(ReplicaSet)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../3.pod/4.pod_network.html">
            
                <a href="../3.pod/4.pod_network.html">
            
                    
                    3.34 Pod 端口映射
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="../3.pod/5.update.html">
            
                <a href="../3.pod/5.update.html">
            
                    
                    3.5 Pod 升级、回滚
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="../3.pod/6.scale.html">
            
                <a href="../3.pod/6.scale.html">
            
                    
                    3.6 Pod 缩放
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8" data-path="../3.pod/7.lable.html">
            
                <a href="../3.pod/7.lable.html">
            
                    
                    3.7.Pod 标签
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9" data-path="../3.pod/8.schedule.html">
            
                <a href="../3.pod/8.schedule.html">
            
                    
                    3.8 Pod 调度
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.10" data-path="../3.pod/9.jobs_cronjobs.html">
            
                <a href="../3.pod/9.jobs_cronjobs.html">
            
                    
                    3.9 Jobs、CronJobs
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../4.network/">
            
                <a href="../4.network/">
            
                    
                    4.Kubernetes 网络
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../4.network/">
            
                <a href="../4.network/">
            
                    
                    导读
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../4.network/1.network.html">
            
                <a href="../4.network/1.network.html">
            
                    
                    4.1 Kubernetes 网络
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../4.network/2.endpoint.html">
            
                <a href="../4.network/2.endpoint.html">
            
                    
                    4.2 Endpoint
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../4.network/3.ingress.html">
            
                <a href="../4.network/3.ingress.html">
            
                    
                    4.3 ingress
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../4.network/4.discovery.html">
            
                <a href="../4.network/4.discovery.html">
            
                    
                    4.4 服务发现
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../5.volumes/">
            
                <a href="../5.volumes/">
            
                    
                    5.volumes
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../5.volumes/">
            
                <a href="../5.volumes/">
            
                    
                    导读
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../5.volumes/1.volumes.html">
            
                <a href="../5.volumes/1.volumes.html">
            
                    
                    5.1 卷
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../5.volumes/2.secret_configmap.html">
            
                <a href="../5.volumes/2.secret_configmap.html">
            
                    
                    5.2 secret 和 ConfigMap 卷
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../5.volumes/3.nfts.html">
            
                <a href="../5.volumes/3.nfts.html">
            
                    
                    5.3 NFS卷
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../5.volumes/4.pv_pvc.html">
            
                <a href="../5.volumes/4.pv_pvc.html">
            
                    
                    5.4 持久化卷
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../6.api_safe/">
            
                <a href="../6.api_safe/">
            
                    
                    6.API 和 安全
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../6.api_safe/">
            
                <a href="../6.api_safe/">
            
                    
                    导读
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../7.health/">
            
                <a href="../7.health/">
            
                    
                    7.维护和故障排除
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../8.health/README.md">
            
                <span>
            
                    
                    导读
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../k8s.html">
            
                <a href="../k8s.html">
            
                    
                    Kubernetes 命令概览
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../ckad.html">
            
                <a href="../ckad.html">
            
                    
                    CKAD 认证帮助
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >2.1 使用 Minikube 部署</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon "></span><a href="#21-&#x4F7F;&#x7528;-minikube-&#x90E8;&#x7F72;"><b></b>2.1 &#x4F7F;&#x7528; Minikube &#x90E8;&#x7F72;</a></li><ul><li><span class="title-icon "></span><a href="#minikube"><b></b>Minikube</a></li><ul><li><span class="title-icon "></span><a href="#&#x90E8;&#x7F72;"><b></b>&#x90E8;&#x7F72;</a></li><li><span class="title-icon "></span><a href="#&#x67E5;&#x770B;&#x96C6;&#x7FA4;&#x72B6;&#x6001;"><b></b>&#x67E5;&#x770B;&#x96C6;&#x7FA4;&#x72B6;&#x6001;</a></li></ul><li><span class="title-icon "></span><a href="#&#x521B;&#x5EFA;&#x8D44;&#x6E90;"><b></b>&#x521B;&#x5EFA;&#x8D44;&#x6E90;</a></li><ul><li><span class="title-icon "></span><a href="#&#x521B;&#x5EFA;-deployment"><b></b>&#x521B;&#x5EFA; Deployment</a></li><li><span class="title-icon "></span><a href="#&#x521B;&#x5EFA;-service"><b></b>&#x521B;&#x5EFA; Service</a></li><li><span class="title-icon "></span><a href="#&#x6E05;&#x7406;&#x96C6;&#x7FA4;&#x8D44;&#x6E90;"><b></b>&#x6E05;&#x7406;&#x96C6;&#x7FA4;&#x8D44;&#x6E90;</a></li></ul></ul></ul></div><h1 id="21-&#x4F7F;&#x7528;-minikube-&#x90E8;&#x7F72;"><a name="21-&#x4F7F;&#x7528;-minikube-&#x90E8;&#x7F72;" class="anchor-navigation-ex-anchor" href="#21-&#x4F7F;&#x7528;-minikube-&#x90E8;&#x7F72;"><i class="fa fa-link" aria-hidden="true"></i></a>2.1 &#x4F7F;&#x7528; Minikube &#x90E8;&#x7F72;</h1>
<p>Minikube &#x662F;&#x4E00;&#x4E2A;&#x521B;&#x5EFA;&#x5355;&#x673A; Kubernetes &#x96C6;&#x7FA4;&#x7684; &#x5DE5;&#x5177;&#xFF0C;&#x5B83;&#x53EF;&#x4EE5;&#x5728;&#x4E00;&#x53F0;&#x670D;&#x52A1;&#x5668;&#x4E0A;&#x5FEB;&#x901F;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x5B66;&#x4E60;&#x73AF;&#x5883;&#xFF0C;&#x5355;&#x673A;&#x96C6;&#x7FA4;&#x4E5F;&#x53EF;&#x4EE5;&#x5B66;&#x4E60;&#x5230;&#x5927;&#x591A;&#x6570;&#x5165;&#x95E8;&#x7684; Kubernetes &#x77E5;&#x8BC6;&#x4EE5;&#x53CA;&#x4E0A;&#x624B;&#x7EC3;&#x4E60;&#x3002;CKAD &#x8BA4;&#x8BC1;&#x5E76;&#x4E0D;&#x8981;&#x6C42;&#x638C;&#x63E1; Minikube&#xFF0C;&#x4E0D;&#x8FC7;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x521D;&#x6B65;&#x5B66;&#x4E60;&#x7EC3;&#x4E60;&#xFF0C;&#x540E;&#x9762;&#x518D;&#x4F7F;&#x7528; kubeadm &#x90E8;&#x7F72;&#x591A;&#x8282;&#x70B9;&#x96C6;&#x7FA4;&#x3002;</p>
<p>&#x672C;&#x7BC7;&#x5185;&#x5BB9;&#x8F83;&#x4E3A;&#x7B80;&#x5355;&#xFF0C;&#x53EF;&#x4F9B;&#x8BFB;&#x8005;&#x7EC3;&#x624B;&#x4F7F;&#x7528;&#xFF0C;&#x9664;&#x4E86;&#x4F1A;&#x4F7F;&#x7528; minikube &#x90E8;&#x7F72; kubernetes &#x5916;&#xFF0C;&#x4E5F;&#x4F1A;&#x90E8;&#x7F72;&#x5E94;&#x7528;&#xFF0C;&#x5BF9;&#x4E8E;&#x672C;&#x7AE0;&#x7684;&#x5185;&#x5BB9;&#xFF0C;&#x8BFB;&#x8005;&#x53EF;&#x5FEB;&#x901F;&#x7EC3;&#x4E60;&#x4E00;&#x904D;&#xFF0C;&#x540E;&#x9762;&#x518D;&#x8BE6;&#x7EC6;&#x4ECB;&#x7ECD;&#x5404;&#x65B9;&#x9762;&#x7684;&#x77E5;&#x8BC6;&#x3002;</p>
<h2 id="minikube"><a name="minikube" class="anchor-navigation-ex-anchor" href="#minikube"><i class="fa fa-link" aria-hidden="true"></i></a>Minikube</h2>
<p>Minikube &#x662F;&#x4E00;&#x4E2A;&#x4E8C;&#x8FDB;&#x5236;&#x5DE5;&#x5177;&#xFF0C;&#x9879;&#x76EE;&#x6E90;&#x7801;&#x6216;&#x6587;&#x6863;&#x7B49;&#x5185;&#x5BB9;&#x53EF;&#x4EE5;&#x5728; <a href="https://github.com/kubernetes/minikube" target="_blank">https://github.com/kubernetes/minikube</a> &#x4E2D;&#x627E;&#x5230;&#xFF0C;&#x5DF2;&#x7ECF;&#x7F16;&#x8BD1;&#x597D;&#x7684;&#x4E8C;&#x8FDB;&#x5236;&#x53EF;&#x6267;&#x884C;&#x6587;&#x4EF6;&#xFF0C;&#x53EF;&#x4EE5;&#x5728;&#x4ED3;&#x5E93;&#x7684; Release &#x4E2D;&#x4E0B;&#x8F7D;&#xFF0C;Minikube &#x652F;&#x6301; Windows &#x3001;Linux&#x3001;MacOS&#x3002;</p>
<p>&#x76F4;&#x63A5;&#x4E0B;&#x8F7D; minikube &#x6700;&#x65B0;&#x7248;&#x672C;&#x7684;&#x4E8C;&#x8FDB;&#x5236;&#x6587;&#x4EF6;&#x3002;</p>
<p>&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x5B98;&#x65B9; Github &#x4ED3;&#x5E93;&#x4E0B;&#x8F7D;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x56FD;&#x5185;&#x4EE3;&#x7406;&#x4E0B;&#x8F7D;&#x3002;</p>
<p>&#x4E0B;&#x8F7D;&#x5730;&#x5740;(Linux&#x7248;&#x672C;)&#xFF1A;</p>
<ul>
<li><a href="https://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v1.20.0/minikube-linux-amd64" target="_blank">https://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v1.20.0/minikube-linux-amd64</a></li>
<li><a href="https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64" target="_blank">https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64</a></li>
</ul>
<p>&#x6CE8;&#xFF1A;&#x5982;&#x679C;&#x8981;&#x4E0B;&#x8F7D; Win &#x7248;&#x672C;&#xFF0C;&#x628A; <code>minkube-linux-amd64</code> &#x6539;&#x6210; <code>minkube-windows-amd64.exe</code> &#x5373;&#x53EF;&#xFF1B;&#x5982;&#x679C;&#x662F; MacOS &#x5219;&#x662F; <code>minikube-darwin-amd64</code>&#x3002;&#x53E6;&#x5916;&#x8981;&#x6CE8;&#x610F;&#x4E0B;&#x8F7D;&#x7684;&#x7248;&#x672C;&#x53F7; &#x3002;</p>
<p>&#x963F;&#x91CC;&#x4E91;&#x6E90;&#x4E0B;&#x8F7D;&#x7684;&#x4E8C;&#x8FDB;&#x5236;&#x5DE5;&#x5177;&#xFF0C;&#x672C;&#x8EAB;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x56FD;&#x5185;&#x955C;&#x50CF;&#xFF0C;&#x4E0D;&#x9700;&#x8981;&#x4EE3;&#x7406;&#xFF0C;&#x53EF;&#x4EE5;&#x5230;&#x4ED3;&#x5E93;&#x4E86;&#x89E3; <a href="https://github.com/AliyunContainerService/minikube" target="_blank">https://github.com/AliyunContainerService/minikube</a>&#x3002;</p>
<p>&#x4F60;&#x4E5F;&#x53EF;&#x4EE5;&#x770B;&#x5B98;&#x65B9;&#x6587;&#x6863;&#xFF0C;&#x6309;&#x7167;&#x6587;&#x6863;&#x5B89;&#x88C5; <a href="https://minikube.sigs.k8s.io/docs/start/" target="_blank">https://minikube.sigs.k8s.io/docs/start/</a> &#x3002;</p>
<pre class="language-"><code class="lang-bash"><span class="token function">curl</span> -Lo minikube <span class="token punctuation">{</span>&#x4E0B;&#x8F7D;&#x5730;&#x5740;<span class="token punctuation">}</span>
</code></pre>
<pre class="language-"><code class="lang-bash"><span class="token function">chmod</span> +x minikube
</code></pre>
<pre class="language-"><code class="lang-bash"><span class="token function">sudo</span> <span class="token function">mv</span> minikube /usr/local/bin
</code></pre>
<h3 id="&#x90E8;&#x7F72;"><a name="&#x90E8;&#x7F72;" class="anchor-navigation-ex-anchor" href="#&#x90E8;&#x7F72;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x90E8;&#x7F72;</h3>
<p>&#x76F4;&#x63A5;&#x6267;&#x884C; <code>minikube start</code> &#x547D;&#x4EE4;&#x5373;&#x53EF;&#x8FDB;&#x884C;&#x90E8;&#x7F72;&#xFF0C;&#x4F46;&#x662F;&#x56FD;&#x5185;&#x4F1A;&#x88AB;&#x5899;&#xFF0C;&#x53EF;&#x80FD;&#x62C9;&#x53D6;&#x4E0D;&#x4E86;&#x955C;&#x50CF;&#xFF0C;&#x9700;&#x8981;&#x8BBE;&#x7F6E;&#x4EE3;&#x7406;&#xFF0C;&#x53EF;&#x53C2;&#x8003; <a href="4.kubeadm_prox.md">2.4 &#x7AE0;&#x8BBE;&#x7F6E;&#x955C;&#x50CF;&#x4EE3;&#x7406;</a> &#x3002;</p>
<pre class="language-"><code class="lang-bash"><span class="token comment"># &#x56FD;&#x5916;&#x670D;&#x52A1;&#x5668;</span>
minikube start
<span class="token comment"># &#x4F7F;&#x7528;&#x963F;&#x91CC;&#x4E91;&#x7248;&#x672C;&#x65F6;&#xFF0C;&#x6307;&#x5B9A;&#x56FD;&#x5185;&#x6E90;</span>
minikube start --image-mirror-country<span class="token operator">=</span>cn
<span class="token comment"># &#x4F7F;&#x7528;&#x963F;&#x91CC;&#x4E91;&#x7248;&#x672C;&#x65F6;&#xFF0C;&#x6307;&#x5B9A;&#x955C;&#x50CF;&#x6E90;</span>
minikube start --image-mirror<span class="token operator">=</span>registry.cn-hangzhou.aliyuncs.com/google_containers
</code></pre>
<p>&#x6CE8;&#xFF1A;&#x865A;&#x62DF;&#x673A;&#x5B89;&#x88C5;&#x6216;&#x5176;&#x4ED6;&#x65B9;&#x5F0F;&#xFF0C;&#x9700;&#x8981;&#x914D;&#x7F6E;&#x5B89;&#x88C5;&#x9A71;&#x52A8;&#xFF0C;&#x8BF7;&#x53C2;&#x8003;&#x5B98;&#x65B9;&#x6587;&#x6863;&#x3002;&#x8FD8;&#x662F;&#x65E0;&#x6CD5;&#x62C9;&#x53D6;&#x955C;&#x50CF;&#x7684;&#x8BDD;&#xFF0C;&#x6253;&#x5F00;&#x6587;&#x6863;&#x770B;&#x770B; <a href="https://minikube.sigs.k8s.io/docs/handbook/vpn_and_proxy/" target="_blank">https://minikube.sigs.k8s.io/docs/handbook/vpn_and_proxy/</a> &#xFF0C;&#x914D;&#x7F6E;&#x4EE3;&#x7406;&#x8BD5;&#x8BD5;&#x3002;</p>
<p>&#x63A5;&#x4E0B;&#x6765; minikube &#x4F1A;&#x62C9;&#x53D6;&#x5404;&#x79CD;&#x955C;&#x50CF;&#xFF0C;&#x9700;&#x8981;&#x4E00;&#x4E9B;&#x65F6;&#x95F4;&#x3002;</p>
<pre class="language-"><code class="lang-bash">* Pulling base image <span class="token punctuation">..</span>.
* Downloading Kubernetes v1.20.2 preload <span class="token punctuation">..</span>.
    <span class="token operator">&gt;</span> preloaded-images-k8s-v10-v1<span class="token punctuation">..</span>.: <span class="token number">491.71</span> MiB / <span class="token number">491.71</span> MiB  <span class="token number">100.00</span>% <span class="token number">60.04</span> Mi
    <span class="token operator">&gt;</span> gcr.io/k8s-minikube/kicbase<span class="token punctuation">..</span>.: <span class="token number">357.67</span> MiB / <span class="token number">357.67</span> MiB  <span class="token number">100.00</span>% <span class="token number">7.41</span> MiB
* Creating docker container <span class="token punctuation">(</span>CPUs<span class="token operator">=</span><span class="token number">2</span>, <span class="token assign-left variable">Memory</span><span class="token operator">=</span>4000MB<span class="token punctuation">)</span> <span class="token punctuation">..</span>./
</code></pre>
<p>&#x901A;&#x8FC7; <code>minikube version</code> &#x547D;&#x4EE4;&#x53EF;&#x4EE5;&#x67E5;&#x770B; minikube &#x7684;&#x7248;&#x672C;&#xFF0C;&#x63A5;&#x4E0B;&#x6765;&#x6211;&#x4EEC;&#x4F7F;&#x7528; <code>minikube start</code> &#x547D;&#x4EE4;&#xFF0C;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x521B;&#x5EFA;&#x4E00;&#x4E2A; kubernetes &#x96C6;&#x7FA4;&#x3002;</p>
<p><strong>&#x95EE;&#x9898;&#x4E00;</strong></p>
<p>&#x5982;&#x679C;&#x542F;&#x52A8;&#x4E0D;&#x8D77;&#x6765;&#x63D0;&#x793A;&#x6CA1;&#x6709; docker &#x7528;&#x6237;&#xFF0C;&#x8FD9;&#x662F;&#x56E0;&#x4E3A;&#x9ED8;&#x8BA4;&#x4E0D;&#x5E94;&#x8BE5;&#x4F7F;&#x7528; root &#x7528;&#x6237;&#x6267;&#x884C;&#x547D;&#x4EE4;&#x548C;&#x542F;&#x52A8;&#x7A0B;&#x5E8F;&#xFF0C;&#x53EF;&#x4EE5;&#x521B;&#x5EFA;&#x4E00;&#x4E2A; docker &#x7528;&#x6237;&#xFF0C;&#x4E5F;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; <code>--driver=none</code> &#x6307;&#x5B9A;&#x4E0D;&#x7528; docker &#x7528;&#x6237;&#x3002;</p>
<p>&#x5982;&#x679C;&#x8981;&#x7528; docker &#x7528;&#x6237;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">    <span class="token function">groupdel</span> docker
    <span class="token function">useradd</span> -m docker
    <span class="token function">passwd</span> docker
    <span class="token comment"># &#x4FEE;&#x6539;&#x5BC6;&#x7801;&#x540E;&#xFF0C;&#x52A0;&#x5165;&#x7528;&#x6237;&#x7EC4;</span>
    gpasswd -a docker docker
</code></pre>
<p>&#x6253;&#x5F00; <code>/etc/sudoers</code> &#x6587;&#x4EF6;&#xFF0C;&#x5728; <code>root ALL=(ALL:ALL) ALL</code> &#x4E0B; &#x589E;&#x52A0;&#x65B0;&#x7684;&#x4E00;&#x884C;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">docker <span class="token assign-left variable">ALL</span><span class="token operator">=</span><span class="token punctuation">(</span>ALL<span class="token punctuation">)</span>ALL
</code></pre>
<p>&#x7136;&#x540E;&#x5207;&#x6362;&#x4E3A; docker &#x7528;&#x6237;&#xFF1A;<code>su docker</code> &#x3002;</p>
<p>&#x5982;&#x679C;&#x4E0D;&#x7528; docker &#x7528;&#x6237;&#xFF0C;&#x53EA;&#x9700;&#x8981;&#x5728;&#x521D;&#x59CB;&#x5316;&#x96C6;&#x7FA4;&#x65F6;&#x52A0;&#x4E0A; <code>--driver=none</code> &#x3002;</p>
<pre class="language-"><code class="lang-bash">minikube start --driver<span class="token operator">=</span>none
</code></pre>
<p><strong>&#x95EE;&#x9898;&#x4E8C;</strong></p>
<p>PS&#xFF1A;&#x5982;&#x679C;&#x62A5; <code>X Exiting due to GUEST_MISSING_CONNTRACK: Sorry, Kubernetes 1.20.2 requires conntrack to be installed in root&apos;s path</code>&#xFF0C;&#x5219;&#x9700;&#x8981;&#x5B89;&#x88C5; constrack &#xFF0C;<code>apt install conntrack</code>&#x3002;</p>
<p>&#x5982;&#x679C;&#x6CA1;&#x6709;&#x95EE;&#x9898;&#xFF0C;&#x4F1A;&#x81EA;&#x52A8;&#x8FDB;&#x884C;&#x5B89;&#x88C5;&#x3002;</p>
<p><img src="images/minikube&#x90E8;&#x7F72;.png" alt="minikube&#x90E8;&#x7F72;"></p>
<p>minikube &#x5B8C;&#x6210;&#x521D;&#x59CB;&#x5316;&#x540E;&#xFF0C;&#x6253;&#x5F00;&#x65B0;&#x7684;&#x7EC8;&#x7AEF;&#x7A97;&#x53E3;&#xFF0C;&#x6267;&#x884C; <code>minikube dashboard</code> &#x542F;&#x52A8;&#x9762;&#x677F;&#xFF0C;&#x6839;&#x636E; URL &#x5730;&#x5740;&#xFF0C;&#x53EF;&#x4EE5;&#x8BBF;&#x95EE;&#x9762;&#x677F;&#x3002;</p>
<p>&#x6B63;&#x5E38;&#x7684;&#x8BDD;&#xFF0C;&#x6267;&#x884C; <code>docker ps</code> &#x540E;&#x662F;&#x8FD9;&#x6837;&#x7684;&#x3002;</p>
<p><img src="images/docker_ps.png" alt="docker_ps"></p>
<h3 id="&#x67E5;&#x770B;&#x96C6;&#x7FA4;&#x72B6;&#x6001;"><a name="&#x67E5;&#x770B;&#x96C6;&#x7FA4;&#x72B6;&#x6001;" class="anchor-navigation-ex-anchor" href="#&#x67E5;&#x770B;&#x96C6;&#x7FA4;&#x72B6;&#x6001;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x67E5;&#x770B;&#x96C6;&#x7FA4;&#x72B6;&#x6001;</h3>
<p>&#x672C;&#x8EAB; minikube &#x5E26;&#x6709;&#x4E00;&#x4E9B;&#x7B80;&#x5355;&#x7684; <code>kubectl</code> &#x547D;&#x4EE4;&#xFF0C;&#x53EF;&#x4EE5;&#x67E5;&#x770B;&#x96C6;&#x7FA4;&#x72B6;&#x6001;&#x4FE1;&#x606F;&#x3002;</p>
<p>&#x83B7;&#x53D6;&#x96C6;&#x7FA4;&#x6240;&#x6709;&#x8282;&#x70B9;(&#x673A;&#x5668;)&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">minikube kubectl get nodes
</code></pre>
<p>&#x83B7;&#x53D6;&#x96C6;&#x7FA4;&#x6240;&#x6709;&#x547D;&#x540D;&#x7A7A;&#x95F4;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">minikube kubectl get namespaces
</code></pre>
<p>&#x67E5;&#x770B;&#x96C6;&#x7FA4;&#x6240;&#x6709; Pod&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">minikube kubectl -- get pods -A
</code></pre>
<p><img src="images/minikube&#x547D;&#x4EE4;.png" alt="minikube&#x547D;&#x4EE4;"></p>
<h2 id="&#x521B;&#x5EFA;&#x8D44;&#x6E90;"><a name="&#x521B;&#x5EFA;&#x8D44;&#x6E90;" class="anchor-navigation-ex-anchor" href="#&#x521B;&#x5EFA;&#x8D44;&#x6E90;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x521B;&#x5EFA;&#x8D44;&#x6E90;</h2>
<p>&#x7531;&#x4E8E; minikube &#x4E0D;&#x4F1A;&#x81EA;&#x52A8;&#x4E0B;&#x8F7D; kubectl&#x3001;kubelet &#x7B49;&#x5DE5;&#x5177;&#xFF0C;&#x6211;&#x4EEC;&#x9700;&#x8981;&#x624B;&#x52A8;&#x5B89;&#x5B89;&#x88C5;&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x53C2;&#x8003; 2.2 &#x7AE0;&#x7684;&#x5B89;&#x88C5;&#x65B9;&#x6CD5;&#xFF0C; &#x5173;&#x4E8E; kubectl &#x3001;kubelet &#xFF0C;&#x540E;&#x9762;&#x7684;&#x7AE0;&#x8282;&#x4F1A;&#x8BE6;&#x7EC6;&#x4ECB;&#x7ECD;&#x3002;&#x6700;&#x7B80;&#x5355;&#x7684;&#x5B89;&#x88C5;&#x65B9;&#x6CD5;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash"><span class="token comment"># &#x4EC5;&#x4F9B; ubuntu &#x53C2;&#x8003;</span>
snap <span class="token function">install</span> kubectl --classic
snap <span class="token function">install</span> kubelet --classic
</code></pre>
<p>&#x672C;&#x8282;&#x7684;&#x5185;&#x5BB9;&#x4F9B;&#x7B80;&#x5355;&#x7EC3;&#x4E60;&#xFF0C;&#x4E0D;&#x4F1A;&#x8BE6;&#x7EC6;&#x8BF4;&#x660E;&#x547D;&#x4EE4;&#x7684;&#x4F5C;&#x7528;&#x548C;&#x76F8;&#x5173;&#x77E5;&#x8BC6;&#xFF0C;&#x5F85;&#x8BFB;&#x8005;&#x9605;&#x8BFB;&#x540E;&#x9762;&#x7684;&#x7AE0;&#x8282;&#x65F6;&#xFF0C;&#x53EF;&#x4EE5;&#x5B66;&#x4E60;&#x5230;&#x66F4;&#x591A;&#x5185;&#x5BB9;&#x3002;</p>
<h3 id="&#x521B;&#x5EFA;-deployment"><a name="&#x521B;&#x5EFA;-deployment" class="anchor-navigation-ex-anchor" href="#&#x521B;&#x5EFA;-deployment"><i class="fa fa-link" aria-hidden="true"></i></a>&#x521B;&#x5EFA; Deployment</h3>
<p>Deployment &#x53EF;&#x4EE5;&#x90E8;&#x7F72;&#x5E94;&#x7528;&#x5E76;&#x7BA1;&#x7406;&#x5B9E;&#x4F8B;&#x6570;&#x91CF;&#xFF0C;&#x5B83;&#x63D0;&#x4F9B;&#x4E86;&#x4E00;&#x79CD;&#x6545;&#x969C;&#x7684;&#x81EA;&#x6211;&#x4FEE;&#x590D;&#x673A;&#x5236;&#xFF0C;&#x5F53;&#x5E94;&#x7528;&#x6302;&#x4E86;&#x540E;&#xFF0C;Deployment &#x53EF;&#x4EE5;&#x81EA;&#x52A8;&#x542F;&#x52A8;&#x4E00;&#x4E2A;&#x65B0;&#x7684;&#x5B9E;&#x4F8B;&#xFF0C;&#x7EF4;&#x62A4;&#x56FA;&#x5B9A;&#x6570;&#x91CF;&#x7684; Pod&#x3002;</p>
<p><code>kubectl create deployment</code>&#x547D;&#x4EE4;&#x521B;&#x5EFA;&#x7BA1;&#x7406; Pod &#x7684; Deployment&#x3002;</p>
<pre class="language-"><code class="lang-bash"><span class="token comment"># &#x683C;&#x5F0F; kubectl create deployment {deployment&#x540D;&#x79F0;} {&#x53C2;&#x6570;}</span>
kubectl create deployment hello --image<span class="token operator">=</span>nginx:latest
</code></pre>
<p>&#x67E5;&#x770B; Deployment&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">kubectl get deployments
</code></pre>
<pre class="language-"><code class="lang-bash">NAME    READY   UP-TO-DATE   AVAILABLE   AGE
hello   <span class="token number">1</span>/1     <span class="token number">1</span>            <span class="token number">1</span>           6m39s
</code></pre>
<p>&#x67E5;&#x770B; Pod &#xFF1A;</p>
<pre class="language-"><code class="lang-bash">kubectl get pods
</code></pre>
<pre class="language-"><code class="lang-bash">NAME                    READY   STATUS    RESTARTS   AGE
hello-b8d95ff4c-x67zr   <span class="token number">1</span>/1     Running   <span class="token number">0</span>          7m8s
</code></pre>
<p>&#x67E5;&#x770B;&#x96C6;&#x7FA4;&#x4E8B;&#x4EF6;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">kubectl get events
</code></pre>
<p>&#x67E5;&#x770B; <code>kubectl</code> &#x914D;&#x7F6E;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">kubectl config view
</code></pre>
<h3 id="&#x521B;&#x5EFA;-service"><a name="&#x521B;&#x5EFA;-service" class="anchor-navigation-ex-anchor" href="#&#x521B;&#x5EFA;-service"><i class="fa fa-link" aria-hidden="true"></i></a>&#x521B;&#x5EFA; Service</h3>
<p>Service &#x4E3A; Pod &#x63D0;&#x4F9B;&#x4E86;&#x4E00;&#x79CD;&#x5916;&#x7F51;&#x8BBF;&#x95EE;&#x80FD;&#x529B;&#xFF0C;&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;Pod &#x53EA;&#x80FD;&#x5728; Kubernetes &#x96C6;&#x7FA4;&#x7684;<strong>&#x540C;&#x4E00;&#x8282;&#x70B9;&#x8BBF;&#x95EE;</strong>&#xFF0C;&#x5982;&#x679C;&#x8981;&#x5916;&#x90E8;&#x7F51;&#x7EDC;&#x8BBF;&#x95EE;&#xFF0C;&#x5219;&#x9700;&#x8981;&#x4E3A; Pod &#x66B4;&#x9732;&#x4E00;&#x4E2A; Kubnetes Service&#xFF0C;Service &#x4E3A; Pod &#x63D0;&#x4F9B;&#x4E86;&#x5916;&#x7F51;&#x8BBF;&#x95EE;&#x80FD;&#x529B;&#x3002;&#x8FD9;&#x91CC;&#x6211;&#x4EEC;&#x628A;&#x4E0A;&#x4E00;&#x5C0F;&#x8282;&#x7684; hello &#x66B4;&#x9732;&#x51FA;&#x53BB;&#x3002;</p>
<p>nginx &#x955C;&#x50CF;&#x4F1A;&#x66B4;&#x9732;&#x4E00;&#x4E2A; 80 &#x7AEF;&#x53E3;&#xFF0C;&#x901A;&#x8FC7; 80 &#x7AEF;&#x53E3;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x8BBF;&#x95EE;&#x5230; nginx &#x670D;&#x52A1;&#x3002;&#x4F46;&#x662F;&#x5728; Kubernetes &#x4E2D;&#xFF0C;&#x5219;&#x53EF;&#x80FD;&#x6709;&#x4E9B;&#x9EBB;&#x70E6;&#x3002;</p>
<p>&#x6BCF;&#x4E2A; Pod &#x5728;&#x96C6;&#x7FA4;&#x4E2D;&#x90FD;&#x6709;&#x4E00;&#x4E2A;&#x552F;&#x4E00; IP&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x67E5;&#x770B;&#x8BE6;&#x7EC6;&#x7684; Pod &#x4FE1;&#x606F;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">kubectl get pods -o wide
</code></pre>
<p><img src="images/minikube_pod.png" alt="minikube_pod"></p>
<p>&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x8BBF;&#x95EE;&#x5B83;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash"><span class="token function">curl</span> <span class="token number">172.17</span>.0.3
</code></pre>
<p><img src="images/minikube_&#x8BBF;&#x95EE;nginx.png" alt="minikube\_&#x8BBF;&#x95EE;nginx"></p>
<p>&#x4E3A;&#x4E86;&#x80FD;&#x591F;&#x5728;&#x5916;&#x7F51;&#x8BBF;&#x95EE;&#xFF0C;&#x6211;&#x4EEC;&#x521B;&#x5EFA; Service&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">kubectl expose deployment hello --type<span class="token operator">=</span>LoadBalancer --port<span class="token operator">=</span><span class="token number">80</span>
</code></pre>
<p>&#x7136;&#x540E;&#x67E5;&#x770B;&#x521A;&#x521A;&#x521B;&#x5EFA;&#x7684; service&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">kubectl get <span class="token function">service</span> hello
<span class="token comment"># &#x6216;</span>
minikube <span class="token function">service</span> hello
</code></pre>
<pre class="language-"><code class="lang-bash">NAME         TYPE           CLUSTER-IP      EXTERNAL-IP   PORT<span class="token punctuation">(</span>S<span class="token punctuation">)</span>        AGE
hello        LoadBalancer   <span class="token number">10.102</span>.73.188   <span class="token operator">&lt;</span>pending<span class="token operator">&gt;</span>     <span class="token number">80</span>:31286/TCP   5s
</code></pre>
<pre class="language-"><code class="lang-bash"><span class="token operator">|</span>-----------<span class="token operator">|</span>-------<span class="token operator">|</span>-------------<span class="token operator">|</span>-------------------------<span class="token operator">|</span>
<span class="token operator">|</span> NAMESPACE <span class="token operator">|</span> NAME  <span class="token operator">|</span> TARGET PORT <span class="token operator">|</span>           URL           <span class="token operator">|</span>
<span class="token operator">|</span>-----------<span class="token operator">|</span>-------<span class="token operator">|</span>-------------<span class="token operator">|</span>-------------------------<span class="token operator">|</span>
<span class="token operator">|</span> default   <span class="token operator">|</span> hello <span class="token operator">|</span>          <span class="token number">80</span> <span class="token operator">|</span> http://10.170.0.5:31286 <span class="token operator">|</span>
<span class="token operator">|</span>-----------<span class="token operator">|</span>-------<span class="token operator">|</span>-------------<span class="token operator">|</span>-------------------------<span class="token operator">|</span>
* Opening <span class="token function">service</span> default/hello <span class="token keyword">in</span> default browser<span class="token punctuation">..</span>.
  http://10.170.0.5:31286
</code></pre>
<p>&#x6B64;&#x65F6;&#xFF0C;&#x5728;&#x96C6;&#x7FA4;&#x5185;&#xFF0C;&#x901A;&#x8FC7; <code>http://10.170.0.5:31286</code> &#x53EF;&#x4EE5;&#x8BBF;&#x95EE;&#x6B64; Pod&#xFF0C;&#x6216;&#x8005;&#x5728;&#x5916;&#x7F51;&#x8BBF;&#x95EE; 31286 &#x7AEF;&#x53E3;&#x3002;</p>
<h3 id="&#x6E05;&#x7406;&#x96C6;&#x7FA4;&#x8D44;&#x6E90;"><a name="&#x6E05;&#x7406;&#x96C6;&#x7FA4;&#x8D44;&#x6E90;" class="anchor-navigation-ex-anchor" href="#&#x6E05;&#x7406;&#x96C6;&#x7FA4;&#x8D44;&#x6E90;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6E05;&#x7406;&#x96C6;&#x7FA4;&#x8D44;&#x6E90;</h3>
<p>&#x7531;&#x4E8E; Minikube &#x521B;&#x5EFA;&#x7684;&#x8D44;&#x6E90;&#x53EA;&#x662F;&#x5355;&#x673A;&#x7684;&#xFF0C;&#x540C;&#x65F6;&#x4F1A;&#x4EA7;&#x751F;&#x5F88;&#x591A; Docker &#x5BB9;&#x5668;&#xFF0C;&#x6211;&#x4EEC;&#x7EC3;&#x4E60;&#x5B8C;&#x6BD5;&#x540E;&#xFF0C;&#x5C31;&#x8981;&#x6E05;&#x9664;&#x73AF;&#x5883;&#xFF0C;&#x4EE5;&#x514D;&#x5F71;&#x54CD;&#x540E;&#x7EED;&#x5B9E;&#x8DF5;&#x73AF;&#x5883;&#x3002;</p>
<p>&#x9996;&#x5148;&#x6E05;&#x9664; service&#x3001;deployment (&#x53EF;&#x4EE5;&#x8DF3;&#x8FC7;&#x8FD9;&#x4E2A;&#x6B65;&#x9AA4;)&#x3002;</p>
<pre class="language-"><code class="lang-bash">kubectl delete <span class="token function">service</span> hello
kubectl delete deployment hello
</code></pre>
<p>&#x7136;&#x540E;&#x505C;&#x6B62; Minikube &#x865A;&#x62DF;&#x673A;&#xFF08;VM&#xFF09;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">minikube stop
</code></pre>
<p>&#x63A5;&#x7740;&#x5220;&#x9664; Minikube &#x865A;&#x62DF;&#x673A;&#xFF08;VM&#xFF09;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">minikube delete
</code></pre>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; &#x75F4;&#x8005;&#x5DE5;&#x826F; 2021 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x6587;&#x6863;&#x6700;&#x540E;&#x66F4;&#x65B0;&#x65F6;&#x95F4;&#xFF1A;
2021-11-17 07:17:23
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="2.deploy.md" class="navigation navigation-prev " aria-label="Previous page: 导读">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="2.kubeadm.html" class="navigation navigation-next " aria-label="Next page: 2.2 使用 kubeadm 部署">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"2.1 使用 Minikube 部署","level":"1.3.2","depth":2,"next":{"title":"2.2 使用 kubeadm 部署","level":"1.3.3","depth":2,"path":"2.deploy/2.kubeadm.md","ref":"2.deploy/2.kubeadm.md","articles":[]},"previous":{"title":"导读","level":"1.3.1","depth":2,"path":"2.deploy/2.deploy.md","ref":"2.deploy/2.deploy.md","articles":[]},"dir":"ltr"},"config":{"plugins":["tbfed-pagefooter","anchor-navigation-ex","mermaid-gb3","insert-logo","chapter-fold","advanced-emoji","github","splitter","alerts","popup","prism","-highlight","livereload"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy 痴者工良 2021","modify_label":"文档最后更新时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"prism":{"lang":{"flow":"typescript","shell":"bash"},"ignore":["mermaid","eval-js"],"css":["prismjs/themes/prism.css"],"js":["prismjs/prism.js","prismjs/components.js","prismjs/components/prism-go.min.js","prismjs/components/prism-yaml.min.js","prismjs/components/prism-bash.min.js","prismjs/components/prism-shell-session.min.js"]},"github":{"url":"https://github.com/whuanle/kubernetes"},"livereload":{},"splitter":{},"search":{},"popup":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"mermaid-gb3":{},"anchor-navigation-ex":{"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"mode":"float","multipleH1":true,"pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"printLog":false,"showGoTop":false,"showLevel":false},"alerts":{},"advanced-emoji":{"embedEmojis":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"insert-logo":{"style":"background: none; max-height: 50px; min-height: 50px","url":"/images/logo.jpg"}},"theme":"default","author":"痴者工良","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Kubernetes - 痴者工良","language":"zh-hans","links":{"sidebar":{"痴者工良的博客":"https://www.whuanle.cn"}},"gitbook":"*","description":"这是一本关于 Kubernetes 的书，作者 痴者工良"},"file":{"path":"2.deploy/1.minikube.md","mtime":"2021-11-16T23:17:23.687Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-11-16T23:21:22.294Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-mermaid-gb3/book/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-insert-logo/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-alerts/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    <script src="../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.min.js"></script>

    </body>
</html>

